require("../css/introduce.less")
require("../fonts/iconfont.css")

document.ready(function(){

    let returnBtn=document.querySelector("#return")
    returnBtn.addEventListener("click",function(){
        location.href="./exercise.html"
    })

    let beginBtn=document.querySelector("#beginBtn");
    beginBtn.addEventListener("click",function(){
        location.href='./drill.html'
    })
    let search=location.search
    console.log(search);
   let att= search.split("=")[1]
   console.log(att);
    window.$http.get('/sports/courseDetail?id='+att,function(res){
        if(res.status===0){
            window.localStorage.setItem("id",res.data.courseId)
            localStorage.setItem("video",JSON.stringify(res.data.fragments))
        }
        console.log(res);
    })
})